OBJ := $(OBJ_DIR)/Context.o $(OBJ_DIR)/Process.o $(OBJ_DIR)/Thread.o $(OBJ_DIR)/ProcessManager.o $(OBJ_DIR)/Scheduler.o

$(OBJ_DIR)/schedule.o : $(OBJ)
	$(LD) $(OBJ) -r -o $@
	
$(OBJ_DIR)/Context.o : Context.cpp Context.h
	$(CC) -o $@ Context.cpp

$(OBJ_DIR)/Process.o : Process.cpp Process.h Thread.h ../fs/FileControlBlock.h
	$(CC) -o $@ Process.cpp

$(OBJ_DIR)/Thread.o : Thread.cpp Thread.h Process.h 
	$(CC) -o $@ Thread.cpp

$(OBJ_DIR)/ProcessManager.o : ProcessManager.cpp ProcessManager.h Process.h
	$(CC) -o $@ ProcessManager.cpp

$(OBJ_DIR)/Scheduler.o : Scheduler.cpp Scheduler.h ScheduleObject.h ../intrman/Callout.h
	$(CC) -o $@ Scheduler.cpp

clean : - rm $(OBJ)

.PHONY : all clean

